package com.zysd.collection.scheduler.controller;


import com.lensyn.common.utils.system.response.Response;
import com.zysd.collection.scheduler.service.channel.OfflineScaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

@RestController
public class OfflineScaleController {

    @Autowired
    private OfflineScaleService offlineScaleService;


    @GetMapping("offlineScale")
    public Response scale(String createDate) {
        try {
            offlineScaleService.scale(createDate);
            return new Response().success();
        } catch (ParseException e) {
            return new Response().failure();
        }
    }
}
